#ifndef F_CASuperServerC_h
#define F_CASuperServerC_h

// ***********************************************************************

// class EDROOMTopContext

// ***********************************************************************



class EDROOMTopContext {

protected:

enum EDROOMCASuperServerSignal { EDROOMSignalTimeout, EDROOMSignalDestroy, SResAck, SResNack, SResReq, SFreeRes };


	friend class CASuperServer;

	CASuperServer &EDROOMcomponent;

	CEDROOMMessage * &Msg;

	CEDROOMMessage * &MsgBack;

	//Ports

	CEDROOMInterface & Service8;
	CEDROOMInterface & Service7;
	CEDROOMInterface & Service6;
	CEDROOMInterface & Service5;
	CEDROOMInterface & Service4;
	CEDROOMInterface & Service3;
	CEDROOMInterface & Service2;
	CEDROOMInterface & Service;

	enum edroomStateId{I};

	enum IdTrans{ EDROOMMEMORIA };

	//Constantes



	//Variables



	//Pool



	// CONSTRUCTORES

	EDROOMTopContext (CASuperServer &act );

	EDROOMTopContext ( EDROOMTopContext &contex );

public:

	bool EDROOMSearchContextTrans(TEDROOMTransId &edroomCurrentTrans);

	void EDROOMNuevoMens () { EDROOMcomponent.EDROOMNewMsg(); }

};

// ***********************************************************************

// class EDROOMTopState

// ***********************************************************************



class EDROOMTopState : public EDROOMTopContext {

protected:



	EDROOMTopContext::edroomStateId edroomCurrentState;

	EDROOMTopContext::edroomStateId edroomNextState;

	//Variables



	//Pools



public:

	// CONSTRUCTOR

	EDROOMTopState (CASuperServer &act );


	// EDROOMBehaviour**********************************************

	void EDROOMBehaviour();

	// Inicio**********************************************

	void EDROOMInicio();

	// ***********************************************************************

	// SubEstado Inicial 

	// ***********************************************************************



	TEDROOMTransId EDROOMIllegada();

};


#endif
